package cn.tedu.demo02lwd.mapper;

import cn.tedu.demo02lwd.entity.Comp;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface CompMapper {

    @Insert("insert into comp values(null,#{title},#{author}," +
            "#{intro},#{url},0,0,#{created},#{categoryId})")
    void insert(Comp comp);

    @Select("select id,title,author,url,created from comp")
    List<Comp> select();

    @Delete("delete from comp where id=#{id}")
    void delete(int id);


}
